<template>
    <div class="box">
        <div class="box-header">
            <span class="title">流程事项详情</span>
        </div>
        <div class="box-body scroll">
            <ul class="list-form">
                <li class="item" v-for="(item,index) in List" :key="'fi-'+index">
                    <div class="item-header" :title="item.lable">{{item.lable}}</div>
                    <div class="item-body" :title="item.value">{{item.value}}</div>
                </li>
                
            </ul>
            <x-loading v-if="showLoading"></x-loading>
        </div>
    </div>
</template>

<script>
import axios from 'axios'
import Loading from '@/components/Loading'
import bus from '@/utils/bus'

    export default {
        name: '',
        data() {
            return {
                List:[],
                showLoading:false
            }
        },
        created() {
            bus.$on('render-flow-analyze',msg=>{
                this.renderView(msg.id)
            })
        },
        components:{
            'x-loading':Loading
        },
        methods:{
            renderView(id){
                this.showLoading = true
                let params = {code:id}
                axios.get(this.URLHEAD_TA + 'GetFlowPathSchedule',{params:params}).then(res=>{
                    let json = res.data;
                    this.List = json.Data;
                    this.showLoading = false
                })
            }
        }
    }
</script>

<style scoped>
.col{
    padding: 0;
}
.list-form .item {
    display: flex;
    margin-bottom: 2px;
}

.box-body {
    margin: 5px;
    height:478px;
    overflow: auto;
}

.list-form .item-header {
    background: #6f77d1;
    color: #fff;
    width: 130px;
    text-align: center;
    font-size: 12px;
    padding: 12px 0;
    flex-grow: 0;
    flex-shrink: 0;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.box-body {
    overflow: auto;
}

ul.list-form {
    padding: 8px;
}

.list-form .item-body {
    flex-grow: 1;
    background: #00000032;
    color: #fff;
    font-size: 12px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    padding: 12px;
    flex-shrink: 1;
}
</style>